/**
 * @author CH_ywx
 * @Date 2023-05-31
 * @Description
 */
package io.xccit.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@author CH_ywx
 *@Date 2023-05-31
 *@Description RedisTestController
 */
@RestController
public class RedisTestController {
    @Autowired
    private StringRedisTemplate redisTemplate;
    @GetMapping("/redis")
    public String getName(){
        return redisTemplate.opsForValue().get("name");
    }
}
